SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_authority
-- ----------------------------
DROP TABLE IF EXISTS `sys_authority`;
CREATE TABLE `sys_authority` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `title` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '路由组件name或后端权限编码',
  `type` int DEFAULT '0' COMMENT '资源类型【0: 菜单，1:后端接口权限】',
  `path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '路径_前端路由',
  `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '路由_组件路径',
  `redirect` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '重定向',
  `parent_id` bigint DEFAULT '0' COMMENT '父级id',
  `order` int DEFAULT '1' COMMENT '排序',
  `meta` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '扩展信息',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime NOT NULL DEFAULT '1970-01-01 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `name_delete_time_uindex` (`name`,`delete_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='权限表';

-- ----------------------------
-- Records of sys_authority
-- ----------------------------
BEGIN;
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (1, '仪表盘', 'Dashboard', 0, '/dashboard', '/layout/default-layout.vue', '/dashboard/workplace', 0, 1, '{\"title\":\"仪表盘\",\"icon\":\"icon-dashboard\",\"cache\":false,\"order\":1,\"affix\":null,\"hidden\":false}', '2022-08-13 20:44:58', '2022-10-28 20:34:01', 0, '2022-10-29 14:47:10');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (2, '工作台', 'Workplace', 0, 'workplace', '/views/dashboard/workplace/index.vue', NULL, 1, 1, '{\"title\":\"工作台\",\"icon\":null,\"cache\":true,\"order\":1,\"affix\":true,\"hidden\":false}', '2022-08-13 22:24:59', '2022-10-27 20:04:32', 0, '2022-10-29 14:59:05');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (3, 'Arco Design', 'Arco', 0, 'https://arco.design/vue/docs/pro/start', NULL, NULL, 11, 1, '{\"title\":\"Arco Design\",\"icon\":null,\"cache\":false,\"order\":1,\"affix\":false,\"hidden\":false}', '2022-08-14 09:26:18', '2022-10-20 08:24:59', 0, '2022-10-29 15:02:11');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (4, '系统管理', 'System', 0, '/system', '/layout/default-layout.vue', '/system/user', 0, 1, '{\"title\":\"系统管理\",\"icon\":\"icon-apps\",\"cache\":false,\"order\":1,\"affix\":null,\"hidden\":null}', '2022-08-14 10:04:54', '2022-10-23 17:02:28', 0, '2022-10-29 14:47:22');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (5, '用户管理', 'User', 0, 'user', '/views/system/user/index.vue', NULL, 4, 1, '{\"title\": \"用户管理\", \"affix\": true, \"cache\": true}', '2022-08-14 10:07:15', '2022-09-21 23:30:36', 0, '2022-10-29 14:59:56');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (6, '角色及授权管理', 'Role', 0, 'role', '/views/system/role/index.vue', NULL, 4, 1, '{\"title\": \"角色及授权管理\", \"affix\": true, \"cache\": true}', '2022-08-20 15:24:21', '2022-09-22 22:01:39', 0, '2022-10-29 14:59:59');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (7, '权限与菜单管理', 'Authority', 0, 'authority', '/views/system/authority/index.vue', NULL, 4, 1, '{\"title\":\"权限与菜单管理\",\"icon\":\"\",\"cache\":true,\"order\":1,\"affix\":true,\"hidden\":false}', '2022-08-25 21:42:44', '2022-10-20 08:26:53', 0, '2022-10-29 15:00:02');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (8, '撤销令牌', 'revoke_token', 1, '', NULL, NULL, 16, 1, NULL, '2022-09-15 17:24:31', '2022-10-21 19:05:55', 0, '2022-10-29 15:01:55');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (9, '开源项目', 'gitee', 0, 'https://gitee.com/example-cloud', NULL, NULL, 11, 1, '{\"title\":\"开源项目\",\"icon\":null,\"cache\":false,\"order\":1,\"affix\":false,\"hidden\":false}', '2022-09-23 15:10:12', '2022-10-20 08:24:43', 0, '2022-10-29 15:02:14');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (10, 'Example文档', 'example-doc', 0, 'https://example-cloud.gitee.io/example-doc/', NULL, NULL, 11, 1, '{\"title\":\"Example文档\",\"icon\":null,\"cache\":false,\"order\":1,\"affix\":false,\"hidden\":false}', '2022-09-23 19:43:36', '2022-10-20 08:24:10', 0, '2022-10-29 15:02:22');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (11, '外链', 'external-link', 0, '', NULL, NULL, 0, 15, '{\"title\":\"外链\",\"icon\":\"icon-link\",\"cache\":false,\"order\":15,\"affix\":null,\"hidden\":null}', '2022-09-23 19:46:37', '2022-10-28 20:33:47', 0, '2022-10-29 15:00:47');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (12, '服务监控', 'Service Monitor', 0, '', NULL, NULL, 0, 2, '{\"title\": \"服务监控\", \"icon\": \"icon-storage\", \"cache\": false}', '2022-09-27 22:04:28', '2022-09-27 22:04:28', 0, '2022-10-29 15:00:50');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (13, 'Spring Boot 监控', 'Spring Boot Admin', 0, 'http://127.0.0.1:2110', NULL, NULL, 12, 2, '{\"title\": \"Spring Boot 监控\"}', '2022-09-27 22:05:22', '2022-09-28 14:05:58', 0, '2022-10-29 15:02:42');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (14, '用户管理写', 'sys:user:write', 1, NULL, NULL, NULL, 5, 10, NULL, '2022-10-19 20:50:20', '2022-10-29 16:18:03', 0, '2022-10-29 16:18:02');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (15, '用户管理读', 'sys:user:read', 1, NULL, NULL, NULL, 5, 10, NULL, '2022-10-19 21:21:42', '2022-10-29 16:18:11', 0, '2022-10-29 16:18:11');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (16, '令牌管理', 'Token', 0, 'token', '/views/system/token/index.vue', NULL, 4, 10, '{\"title\":\"令牌管理\",\"icon\":null,\"cache\":true,\"order\":10,\"affix\":true,\"hidden\":false}', '2022-10-20 22:38:14', '2022-10-21 20:42:55', 0, '2022-10-29 15:03:49');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (17, '租户管理', 'Tenant', 0, 'tenant', '/views/system/tenant/index.vue', NULL, 4, 10, '{\"title\":\"租户管理\",\"icon\":null,\"cache\":true,\"order\":10,\"affix\":true,\"hidden\":false}', '2022-10-21 20:45:32', '2022-10-21 20:45:32', 0, '2022-10-29 15:03:51');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (18, '组织机构管理', 'Dept', 0, 'dept', '/views/system/dept/index.vue', NULL, 4, 11, '{\"title\":\"组织机构管理\",\"icon\":null,\"cache\":true,\"order\":11,\"affix\":true,\"hidden\":false}', '2022-10-23 12:01:32', '2022-10-29 21:28:28', 0, '2022-10-29 21:28:28');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (19, '客户端管理', 'Client', 0, 'client', '/views/system/client/index.vue', NULL, 4, 10, '{\"title\":\"客户端管理\",\"icon\":null,\"cache\":true,\"order\":10,\"affix\":true,\"hidden\":false}', '2022-10-23 14:37:20', '2022-10-23 14:37:20', 0, '2022-10-29 15:03:57');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (20, '字典管理', 'Dict', 0, 'dict', '/views/system/dict/index.vue', NULL, 4, 10, '{\"title\":\"字典管理\",\"icon\":null,\"cache\":true,\"order\":10,\"affix\":true,\"hidden\":false}', '2022-10-28 21:36:13', '2022-10-28 21:36:13', 0, '2022-10-29 15:04:01');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (21, '个人信息读', 'sys:self:read', 1, NULL, NULL, NULL, 5, 10, NULL, '2022-10-29 16:16:10', '2022-10-29 16:16:10', 0, '2023-02-08 11:32:29');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (22, '个人信息写', 'sys:self:write', 1, NULL, NULL, NULL, 5, 10, NULL, '2022-10-29 16:16:59', '2022-10-29 16:16:59', 0, '2023-02-08 11:32:34');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (23, '角色管理读', 'sys:role:read', 1, NULL, NULL, NULL, 6, 10, NULL, '2022-10-29 16:17:32', '2022-10-29 16:21:50', 0, '2023-02-08 11:32:48');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (24, '角色管理写', 'sys:role:write', 1, NULL, NULL, NULL, 6, 10, NULL, '2022-10-29 16:17:52', '2022-10-29 16:22:16', 0, '2023-02-08 11:32:53');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (25, '权限管理读', 'sys:authority:read', 1, NULL, NULL, NULL, 7, 10, NULL, '2022-10-29 16:19:11', '2022-10-29 16:22:30', 0, '2023-02-08 11:32:57');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (26, '权限管理写', 'sys:authority:write', 1, NULL, NULL, NULL, 7, 10, NULL, '2022-10-29 16:19:52', '2022-10-29 16:22:46', 0, '2023-02-08 11:33:02');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (27, '组织机构管理读', 'sys:dept:read', 1, NULL, NULL, NULL, 18, 10, NULL, '2022-10-29 16:20:14', '2022-10-29 16:22:59', 0, '2023-02-08 11:33:05');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (28, '组织机构管理写', 'sys:dept:write', 1, NULL, NULL, NULL, 18, 10, NULL, '2022-10-29 16:20:42', '2022-10-29 16:23:16', 0, '2023-02-08 11:33:12');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (29, '租户管理读', 'sys:tenant:read', 1, NULL, NULL, NULL, 17, 10, NULL, '2022-10-29 16:21:39', '2022-10-29 16:21:39', 0, '2023-02-08 11:33:16');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (30, '租户管理写', 'sys:tenant:write', 1, NULL, NULL, NULL, 17, 10, NULL, '2022-10-29 16:23:46', '2022-10-29 16:23:46', 0, '2023-02-08 11:33:21');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (31, '字典管理读', 'sys:dict:read', 1, NULL, NULL, NULL, 20, 10, NULL, '2022-10-29 16:24:11', '2022-10-29 16:24:11', 0, '2023-02-08 11:33:25');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (32, '字典管理写', 'sys:dict:write', 1, NULL, NULL, NULL, 20, 10, NULL, '2022-10-29 16:24:38', '2022-10-29 16:24:38', 0, '2023-02-08 11:33:34');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (33, '令牌管理读', 'token:read', 1, NULL, NULL, NULL, 16, 10, NULL, '2022-10-29 16:25:35', '2022-10-29 16:25:35', 0, '2023-02-08 11:33:36');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (34, '客户端管理读', 'client:read', 1, NULL, NULL, NULL, 19, 10, NULL, '2022-10-29 16:26:00', '2022-10-29 16:26:00', 0, '2023-02-08 11:33:41');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (35, '客户端管理写', 'client:write', 1, NULL, NULL, NULL, 19, 10, NULL, '2022-10-29 16:26:23', '2022-10-29 16:26:23', 0, '2023-02-08 11:33:45');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (36, '菜单读', 'sys:menu:read', 1, NULL, NULL, NULL, 7, 10, NULL, '2022-10-29 16:36:31', '2022-10-29 16:36:31', 1, '2023-02-08 11:33:50');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (37, '授予角色权限', 'grant:role:authorization', 1, NULL, NULL, NULL, 6, 10, NULL, '2022-10-29 16:46:58', '2022-10-29 16:46:58', 0, '2023-02-08 11:33:55');
INSERT INTO `sys_authority` (`id`, `title`, `name`, `type`, `path`, `component`, `redirect`, `parent_id`, `order`, `meta`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (38, '授予租户权限', 'grant:tenant:authorization', 1, NULL, NULL, NULL, 17, 10, NULL, '2022-10-29 16:47:30', '2022-10-29 16:47:30', 0, '2023-02-08 11:33:59');
COMMIT;

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '租户id',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构名',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织机构编码',
  `order` int NOT NULL DEFAULT '10' COMMENT '排序',
  `parent_id` bigint NOT NULL DEFAULT '0' COMMENT '父级id',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `deleted` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime NOT NULL DEFAULT '1970-01-01 00:00:00' COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tenant_id_code_delete_time_uindex` (`tenant_id`,`code`,`delete_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='组织机构管理';

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
BEGIN;
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (1, 'e_cloud', '研发部', 'dev', 10, 0, '2022-10-23 12:27:28', '2022-12-23 11:25:57', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (2, 'e_cloud', '研发1部', 'dev1', 10, 1, '2022-10-23 12:28:37', '2022-10-23 13:56:18', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (3, 'e_cloud', '研发2部', 'dev2', 10, 1, '2022-10-23 12:29:01', '2022-10-23 12:29:05', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (4, 'e_cloud', '财务部', 'accounting', 10, 0, '2022-10-23 12:29:59', '2022-10-23 12:30:02', 0, '2022-10-23 13:38:17');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (5, 'e_cloud', 'dasda', 'dasdas', 4, 2, '2022-10-23 13:44:51', '2022-10-23 13:52:23', 1, '2022-10-23 20:48:15');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (6, 'e_cloud', 'dasd', 'adada', 11, 4, '2022-10-23 13:48:01', '2022-10-23 13:48:27', 1, '2022-10-23 20:48:12');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (7, 'e_cloud', 'GDFGDFF', 'GDFGD', 0, 5, '2022-10-23 13:54:38', '2022-10-23 13:56:00', 1, '2022-10-23 13:56:30');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (8, 'e_cloud', '销售部', 'sell', 11, 0, '2022-10-23 20:16:07', '2022-10-23 20:16:16', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (9, 'wfu', '计算机学院', 'computer', 10, 0, '2022-10-28 11:13:42', '2022-10-28 11:13:42', 1, '2022-10-29 05:57:33');
INSERT INTO `sys_dept` (`id`, `tenant_id`, `name`, `code`, `order`, `parent_id`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (10, 'wfu', 'dsad', 'dasas', 10, 9, '2022-10-28 13:28:53', '2022-10-28 13:28:53', 1, '2022-10-29 05:57:31');
COMMIT;

-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '租户id',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名',
  `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '字典键',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime DEFAULT '1970-01-01 00:00:00' COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tenant_id_code_delete_time_uindex` (`tenant_id`,`code`,`delete_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典表';

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` (`id`, `tenant_id`, `name`, `code`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (1, 'e_cloud', '性别', 'gender', '2022-10-29 08:06:22', '2022-10-29 09:20:32', 0, '2022-10-29 09:15:47');
COMMIT;

-- ----------------------------
-- Table structure for sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `dict_id` bigint NOT NULL,
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `value` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `dict_id_value_uindex` (`dict_id`,`value`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=113 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='字典项';

-- ----------------------------
-- Records of sys_dict_item
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict_item` (`id`, `tenant_id`, `dict_id`, `name`, `value`) VALUES (1, 'e_cloud', 1, '男', 'male');
INSERT INTO `sys_dict_item` (`id`, `tenant_id`, `dict_id`, `name`, `value`) VALUES (2, 'e_cloud', 1, '女', 'female');
INSERT INTO `sys_dict_item` (`id`, `tenant_id`, `dict_id`, `name`, `value`) VALUES (3, 'e_cloud', 1, '保密', 'unknown');
COMMIT;

-- ----------------------------
-- Table structure for sys_oauth_client_details
-- ----------------------------
DROP TABLE IF EXISTS `sys_oauth_client_details`;
CREATE TABLE `sys_oauth_client_details` (
  `client_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `resource_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `client_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `scope` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `authorized_grant_types` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `web_server_redirect_uri` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `authorities` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `access_token_validity` int DEFAULT NULL,
  `refresh_token_validity` int DEFAULT NULL,
  `additional_information` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `autoapprove` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`client_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sys_oauth_client_details
-- ----------------------------
BEGIN;
INSERT INTO `sys_oauth_client_details` (`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`) VALUES ('example-app', NULL, 'example-app', 'all', 'password,mobile_password,refresh_token', NULL, NULL, 7200, 25920, NULL, 'true');
INSERT INTO `sys_oauth_client_details` (`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`) VALUES ('example-ui', NULL, 'example-ui', 'all', 'password,refresh_token,mobile_password', NULL, NULL, 7200, 25920, NULL, 'true');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '租户id',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名',
  `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码',
  `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime DEFAULT '1970-01-01 00:00:00' COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tenant_id_code_delete_time_uindex` (`tenant_id`,`code`,`delete_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (1, 'e_cloud', '超级管理员', 'superadmin', 'admin', '2022-08-03 22:24:20', '2022-08-22 22:55:51', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (2, 'e_cloud', 'Hr', 'hr', NULL, '2022-08-19 23:45:33', '2022-08-21 18:10:43', 0, '2022-10-17 15:19:42');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (3, 'e_cloud', '经理', 'manager', NULL, '2022-08-21 17:04:43', '2022-10-17 15:40:55', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (4, 'e_cloud', '产品经理', 'pm', NULL, '2022-08-21 18:32:20', '2022-09-01 21:26:03', 0, '2022-09-26 22:13:50');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (5, 'e_cloud', '产品设计师', 'pd', NULL, '2022-08-21 19:02:14', '2022-08-22 23:36:19', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (6, 'e_cloud', '保安队长', 'baoan', NULL, '2022-10-17 13:47:36', '2022-10-17 20:33:39', 0, '2022-10-17 14:28:11');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (7, 'e_cloud', '后勤主管', 'houqin_m', NULL, '2022-10-17 13:49:12', '2022-10-17 21:14:40', 0, '2022-10-17 14:27:31');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (8, 'wfu', '校长', 'headmaster', NULL, '2022-10-22 22:45:08', '2022-10-22 22:45:08', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (9, 'wfu', '辅导员', 'instructor', NULL, '2022-10-22 23:21:03', '2022-10-22 23:21:03', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (10, 'wfu', '老师', 'teacher', NULL, '2022-10-26 12:12:14', '2022-10-26 12:12:14', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (11, 'wfu', '租户默认管理员', 'defaultAdmin', NULL, '2022-10-29 18:38:04', '2022-10-29 18:38:07', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_role` (`id`, `tenant_id`, `name`, `code`, `created_by`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (12, 'e_cloud', '测试角色', 'test', 'admin', '2022-12-22 11:50:29', '2022-12-22 11:50:29', 0, '1970-01-01 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_authority_join
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_authority_join`;
CREATE TABLE `sys_role_authority_join` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `role_id` bigint NOT NULL,
  `authority_id` bigint NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `sys_role_authority_role_id_authority_id_uindex` (`role_id`,`authority_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1770 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='角色权限中间表';

-- ----------------------------
-- Records of sys_role_authority_join
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (1, 1, 1);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (2, 1, 2);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (3, 1, 3);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (4, 1, 4);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (5, 1, 5);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (6, 1, 6);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (7, 1, 7);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (8, 1, 8);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (9, 1, 9);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (10, 1, 10);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (11, 1, 11);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (12, 1, 12);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (13, 1, 13);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (14, 1, 14);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (15, 1, 15);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (16, 1, 16);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (17, 1, 17);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (18, 1, 18);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (19, 1, 19);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (20, 1, 20);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (21, 1, 21);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (22, 1, 22);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (23, 1, 23);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (24, 1, 24);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (25, 1, 25);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (26, 1, 26);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (27, 1, 27);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (28, 1, 28);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (29, 1, 29);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (30, 1, 30);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (31, 1, 31);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (32, 1, 32);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (33, 1, 33);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (34, 1, 34);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (35, 1, 35);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (36, 1, 36);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (37, 1, 37);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (38, 1, 38);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (41, 2, 1);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (42, 2, 2);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (43, 2, 4);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (44, 2, 5);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (45, 2, 6);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (46, 2, 7);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (47, 2, 14);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (48, 2, 17);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (49, 2, 19);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (50, 2, 32);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (51, 2, 33);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (52, 2, 34);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (53, 2, 35);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (54, 2, 40);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (58, 6, 1);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (59, 6, 2);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (60, 6, 3);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (61, 6, 9);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (62, 6, 10);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (63, 6, 11);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (64, 8, 1);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (65, 8, 2);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (66, 14, 1);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (67, 14, 2);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (68, 14, 3);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (69, 14, 4);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (70, 14, 5);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (71, 14, 6);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (72, 14, 9);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (73, 14, 10);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (74, 14, 11);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (75, 14, 14);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (76, 14, 15);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (77, 14, 18);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (78, 14, 20);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (79, 14, 32);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (80, 14, 33);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (81, 14, 34);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (82, 14, 35);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (83, 14, 36);
INSERT INTO `sys_role_authority_join` (`id`, `role_id`, `authority_id`) VALUES (84, 14, 38);
COMMIT;

-- ----------------------------
-- Table structure for sys_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant`;
CREATE TABLE `sys_tenant` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名',
  `logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'logo',
  `enabled` tinyint NOT NULL COMMENT '状态',
  `start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime DEFAULT NULL COMMENT '过期时间',
  `deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime NOT NULL DEFAULT '1970-01-01 00:00:00' COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='租户表';

-- ----------------------------
-- Records of sys_tenant
-- ----------------------------
BEGIN;
INSERT INTO `sys_tenant` (`id`, `tenant_id`, `name`, `logo`, `enabled`, `start_time`, `end_time`, `deleted`, `delete_time`) VALUES (1, 'e_cloud', 'e云科技', 'https://example-cloud.gitee.io/example-doc/images/logo.svg', 1, '2022-10-21 19:35:08', '2032-01-21 19:35:11', 0, '2022-10-21 21:30:33');
INSERT INTO `sys_tenant` (`id`, `tenant_id`, `name`, `logo`, `enabled`, `start_time`, `end_time`, `deleted`, `delete_time`) VALUES (2, 'wfu', '潍坊学院', 'https://www.wfu.edu.cn/_upload/tpl/04/d2/1234/template1234/images/logo.png', 1, '2022-10-01 17:41:22', '2025-11-28 17:41:22', 0, '1970-01-01 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for sys_tenant_authority_join
-- ----------------------------
DROP TABLE IF EXISTS `sys_tenant_authority_join`;
CREATE TABLE `sys_tenant_authority_join` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户id',
  `authority_id` bigint NOT NULL COMMENT '资源id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tenant_id_authority_id_uindex` (`tenant_id`,`authority_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=174 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sys_tenant_authority_join
-- ----------------------------
BEGIN;
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (1, 'wfu', 1);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (2, 'wfu', 2);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (3, 'wfu', 3);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (4, 'wfu', 4);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (5, 'wfu', 5);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (6, 'wfu', 9);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (7, 'wfu', 10);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (8, 'wfu', 11);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (9, 'wfu', 14);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (10, 'wfu', 15);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (11, 'wfu', 17);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (12, 'wfu', 18);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (13, 'wfu', 19);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (14, 'wfu', 20);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (15, 'wfu', 21);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (16, 'wfu', 22);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (17, 'wfu', 27);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (18, 'wfu', 28);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (19, 'wfu', 29);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (20, 'wfu', 30);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (21, 'wfu', 31);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (22, 'wfu', 32);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (23, 'wfu', 34);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (24, 'wfu', 35);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (25, 'wfu', 36);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (26, 'wfu', 38);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (27, 'wfu', 42);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (28, 'wfu', 43);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (29, 'wfu', 47);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (30, 'wfu', 48);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (31, 'wfu', 52);
INSERT INTO `sys_tenant_authority_join` (`id`, `tenant_id`, `authority_id`) VALUES (32, 'wfu', 53);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `tenant_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '多租户字段',
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名',
  `nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称',
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '密码',
  `gender` tinyint DEFAULT '1' COMMENT '性别',
  `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号',
  `email` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '邮箱',
  `avatar` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像url',
  `non_locked` tinyint NOT NULL DEFAULT '1' COMMENT '锁定',
  `enabled` tinyint NOT NULL DEFAULT '1' COMMENT '状态',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `deleted` tinyint NOT NULL DEFAULT '0' COMMENT '逻辑删除',
  `delete_time` datetime NOT NULL DEFAULT '1970-01-01 00:00:00' COMMENT '逻辑删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `tenant_id_username_delete_time_uindex` (`tenant_id`,`username`,`delete_time`) USING BTREE,
  UNIQUE KEY `tenant_id_phone_delete_time_uindex` (`tenant_id`,`phone`,`delete_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (1, 'e_cloud', 'admin', '破', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 1, '17866666666', NULL, 'http://127.0.0.1:9000/public/2023/02/06/Aliplayer1675490658244ba311497-8cdb-4091-9d51-f0cb51a61d15.png', 1, 1, '2022-07-31 21:47:11', '2023-02-08 19:44:37', 0, '2022-10-16 19:27:48');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (2, 'e_cloud', 'zhangsan', '张三', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 0, '17777777777', '', 'http://127.0.0.1:9000/public/2023/01/18/WechatIMG20160fa7eb2bd-5879-419f-840a-a6c625436f29.jpeg', 1, 1, '2022-08-17 21:57:10', '2023-02-08 19:45:04', 0, '2022-10-16 19:27:45');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (3, 'wfu', 'lisi', '李四', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 1, '17860000000', '230@qq.com', NULL, 1, 1, '2022-08-17 23:09:40', '2022-10-22 23:19:22', 0, '2022-10-16 19:27:43');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (4, 'wfu', 'wangwu', '王五', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 0, '17855555555', '', NULL, 1, 1, '2022-08-20 00:43:19', '2022-10-22 23:24:37', 0, '2022-10-16 19:27:40');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (5, 'e_cloud', 'zhaoliu', '赵六', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 0, '13333333333', 'sa@168.com', 'http://127.0.0.1:9000/public/2023/01/18/WechatIMG20160afcc9c70-c2e3-4c6b-a7b7-870f35d5d419.jpeg', 1, 1, '2022-08-20 00:48:16', '2023-01-18 14:01:23', 0, '2022-10-16 19:15:13');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (6, 'e_cloud', 'laoba', '老八', '$2a$10$EGdVDoQIGb6JRDqoDrT5w.t4s181TnPu7i2p8gPJUn.SVDFGw/bb2', 1, '17862626511', '', 'http://127.0.0.1:9000/public/2023/01/18/kv4tAl8z1wJyde76d5534f95959b7e1880acec3d33ad25e6f67f-77ef-408c-a5c3-fd4919d81f39346378de-962b-4aac-a010-1e0a44b305d5.jpeg', 1, 1, '2022-08-20 01:12:20', '2023-01-18 16:33:43', 0, '2022-10-16 19:14:50');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (7, 'e_cloud', 'xiaojiu', '小九', '$2a$10$LmShRQvZdHcYW2S.X9I0yOqUAD8c5xQHdodmWbDWpnGQ5nT1mglpC', 1, '17888888555', '', 'http://127.0.0.1:9000/public/2023/01/18/kv4tAl8z1wJyde76d5534f95959b7e1880acec3d33ad25e6f67f-77ef-408c-a5c3-fd4919d81f39971584b6-4f36-41e9-8962-381986f24d12.jpeg', 1, 1, '2022-08-20 15:02:26', '2023-01-18 16:33:11', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (8, 'e_cloud', '3211213690', NULL, '$2a$10$vOG50yOYpYo1glC9k/yO6.uuTJI77X71jNnE5Zdeykl11Jc/ke5zW', 1, '17860696059', NULL, NULL, 1, 1, '2022-12-10 21:49:36', '2022-12-10 21:49:36', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (9, 'e_cloud', '5876049560', NULL, '$2a$10$Ny.TgQuczY49wQsDJPApl.Rw5zoTKNbHqSq1nNEXgM20vV95wnGFO', 1, '14444444444', NULL, NULL, 1, 1, '2022-12-11 22:31:04', '2022-12-11 22:31:04', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (10, 'e_cloud', '7118473779', NULL, '$2a$10$5SL2L2JEcii2r21yalBKwOHLRpnWKR9XkzKBnqDJHfoUVYQiQXvSS', 1, '18888888888', NULL, NULL, 1, 1, '2022-12-12 20:37:26', '2022-12-12 20:37:26', 0, '1970-01-01 00:00:00');
INSERT INTO `sys_user` (`id`, `tenant_id`, `username`, `nickname`, `password`, `gender`, `phone`, `email`, `avatar`, `non_locked`, `enabled`, `create_time`, `update_time`, `deleted`, `delete_time`) VALUES (11, 'e_cloud', '1671264242', NULL, '$2a$10$4K11germnGIngnIun.tbEehZ3LR8DpW6qfSU5Jaab1kXXLAbozg8C', 1, '12222222222', NULL, 'http://127.0.0.1:9000/public/2023/02/08/kv4tAl8z1wJyde76d5534f95959b7e1880acec3d33ad25e6f67f-77ef-408c-a5c3-fd4919d81f39a2307341-dc71-4219-8b04-0af3db5d2470.jpeg', 1, 1, '2022-12-17 16:04:03', '2023-02-08 19:48:22', 0, '1970-01-01 00:00:00');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_dept_join
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_dept_join`;
CREATE TABLE `sys_user_dept_join` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `user_id` bigint NOT NULL,
  `dept_id` bigint NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_id` (`user_id`,`dept_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of sys_user_dept_join
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (1, 1, 1);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (2, 2, 2);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (3, 5, 8);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (4, 6, 3);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (5, 7, 3);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (6, 11, 8);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (7, 41, 2);
INSERT INTO `sys_user_dept_join` (`id`, `user_id`, `dept_id`) VALUES (8, 41, 3);
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role_join
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role_join`;
CREATE TABLE `sys_user_role_join` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` bigint NOT NULL,
  `role_id` bigint NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `sys_user_role_user_id_role_id_uindex` (`user_id`,`role_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=274 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='用户角色中间表';

-- ----------------------------
-- Records of sys_user_role_join
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (1, 1, 1);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (2, 2, 1);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (3, 3, 14);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (4, 5, 2);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (5, 6, 6);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (6, 7, 7);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (7, 11, 2);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (8, 41, 6);
INSERT INTO `sys_user_role_join` (`id`, `user_id`, `role_id`) VALUES (9, 41, 7);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
